#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "moto.h"
#include <QSerialPort>
#include "position.h"
#include "sensor.h"

namespace Ui
{
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

    Moto *motor;
    Position gps;
    Sensor sensor;
    QSerialPort sensorCom, gpsCom, ipcCom; // 传感器、gps模块、上位机通讯端口。

    void setSensor();

private slots:
    void readGpsCom();
    void readSensorCom();
    void readIpcCom();

    void on_spinBox_valueChanged(int arg1);

    void on_radioButton_clicked();

    void on_radioButton_2_clicked();

    void on_pushButton_clicked();

    void on_pB_sensor_clicked();

private:
    Ui::MainWindow *ui;
};

#endif // MAINWINDOW_H
